Chat with Documents using OpenAI GPT APIs

您所在的位置:网站首页 knowledge base Chat with Documents using OpenAI GPT APIs

Chat with Documents using OpenAI GPT APIs

2023-02-25 21:40| 来源: 网络整理| 查看: 265

#Chat with Document#Load index saved in JSON formatindex = GPTSimpleVectorIndex.load_from_disk(index_path)

#Query index, this takes care of steps A-D in workflowprint(index.query("Summarize the document?"))

'''OutputThis document provides a summary of the benefits and coverage of the Premera BCBS of AK Standard Gold plan for individuals or families. It outlines the overall deductible, services covered before the deductible is met, other deductibles for specific services, the out-of-pocket limit, copayments and coinsurance costs for common medical events, and excluded services such as assisted fertility treatment, bariatric surgery, cosmetic surgery, dental care (adult), hearing aids, long-term care, private-duty nursing, routine eye care (adult), and weight loss programs. It also provides information about the network provider, mental health and substance abuse services, special health needs, and dental and eye care for children, as well as other covered services such as abortion, acupuncture, chiropractic care or other spinal manipulations, foot care, and non-emergency care when traveling outside the U.S. Finally, it outlines the rights to continue coverage and the agencies that can help with this.'''

print(index.query('''What is the overall deductible amount for Individual vs Family in our-of-network in table format?'''))

'''OutputIndividual | Family $4,000 | $8,000'''

print(index.query('''What is the overall deductible amount for Individual vs Family in our-of-network in table format? Only answer from this content, if you dont know, politely say I couldn't figure out.'''))

'''OutputIndividual: $4,000Family: $4,000'''

print(index.query('''How much does childbirth cost? Only answer from this content, if you dont know, politely say I couldn't figure out.'''))

'''OutputIn this example, Peg would pay: Cost Sharing Deductibles $2,000 Copayments $10 Coinsurance $2,600 What isn't covered Limits or exclusions $60 The Total Peg would pay is $4,670'''

print(index.query("List out all the examples in table format? Only answer from this content, if you dont know, politely say I couldn't figure out."))

'''OutputPeg's Baby | Joe's Diabetes | Mia's Fracture------------------------------------------Cost Sharing | Cost Sharing | Cost SharingDeductibles | Deductibles | Deductibles$2,000 | $2,000 | $2,000Copayments | Copayments | Copayments$10 | $60 | $200Coinsurance | Coinsurance | Coinsurance$2,600 | $0 | $90Limits or Exclusions | Limits or Exclusions | Limits or Exclusions$60 | $20 | $0Total Peg Would Pay | Total Joe Would Pay | Total Mia Would Pay$4,670 | $1,520 | $2,290'''



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3